package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.User;
import com.yunshang.shoppingmall.mapper.UserMapper;
import com.yunshang.shoppingmall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;


    @Override
    public int deleteByPrimaryKey(Integer userId) {
        return userMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public User selectByPrimaryKey(Integer userId) {
        return userMapper.selectByPrimaryKey(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }

    @Override
    public User selectUserByPhone(String phone) {
        return userMapper.selectUserByPhone(phone);
    }

    @Override
    public User selectUserByOpenid(String openid) {
        return userMapper.selectUserByOpenid(openid);
    }

    @Override
    public List<User> selectUserNoByPhone1(String phone) {
        return userMapper.selectUserNoByPhone1(phone);
    }

    @Override
    public List<User> selectUserList() {
        return userMapper.selectUserList();
    }

    @Override
    public User selectPhoneByUserNo(String userNo) {
        return userMapper.selectPhoneByUserNo(userNo);
    }

    @Override
    public List<User> seachUserListByUserIdOrUserName(User user) {
        return userMapper.seachUserListByUserIdOrUserName(user);
    }

    @Override
    public List<User> selectUserListPhone() {
        return userMapper.selectUserListPhone();
    }

    @Override
    public List<User> selectUserListByPhone(String phone) {
        return userMapper.selectUserListByPhone(phone);
    }
}
